Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace PACKAGE_VERSION & __DATE__ with release tag #9

Merged
merged 2 commits into from
Oct 12, 2024

Conversation

GalaxyShard
Copy link
Contributor

Relevant: blocksds/sdk#196

For some reason, git describe seems to return the oldest of all the lightweight tags for any given commit on my machine, so commit 8113974d7f975e349c0e8f7d11b5c1e16e77a496 appears as v1.4.0-blocks instead of v1.5.0-blocks because they are the same commit. This could be fixed by using git's annotated tags, or partially fixed by having SDK_VERSION additionally defined in the top-level SDK Makefile since the SDK always has commits between versions.

@AntonioND
Copy link
Member

The problem I have with this is that it's quite messy, and the only purpose is to have a different version string from the one we have right now. Also, this would be the only tool with this version string, which is strange.

Which version of git do you have? That behaviour is weird.

@GalaxyShard
Copy link
Contributor Author

I'd imagine that if this PR were merged then the other tools should also be updated accordingly, since like you say, it would be inconsistent otherwise.

As for git...

$ git --version
git version 2.46.1

I think it may be caused by git not storing dates for lightweight tags; from man git-tag:

Tag objects (created with -a, -s, or -u) are called "annotated" tags; they contain a creation date, the tagger name and e-mail, a tagging
       message, and an optional GnuPG signature. Whereas a "lightweight" tag is simply a name for an object (usually a commit object).

Makefile Outdated Show resolved Hide resolved
@AntonioND
Copy link
Member

Rename the commit to say build: Replace PACKAGE_VERSION & __DATE__ with git tag

@GalaxyShard
Copy link
Contributor Author

Updated.

@AntonioND
Copy link
Member

Hmmm this doesn't seem to be working fine for me:

Nintendo DS rom tool (commit v2.2.0-40-g0c67281)

What do you get? That tag is really old, there are a bunch of tags after that one. However, according to SemVer, they are "older" versions, so that may be the reason.

@GalaxyShard
Copy link
Contributor Author

Hmmm this doesn't seem to be working fine for me:

Nintendo DS rom tool (commit v2.2.0-40-g0c67281)

What do you get? That tag is really old, there are a bunch of tags after that one. However, according to SemVer, they are "older" versions, so that may be the reason.

This is what I get:

Nintendo DS rom tool (commit 0c67281)

The syntax v2.2.0-40-g0c67281 means the v2.2.0 tag is 40 commits prior to 0c67281. I managed to reproduce your results by making an annotated commit on a0ae6b5, the devkitpro v2.2.0 release. Looks like your local git repository has annotated tags from the original ndstool that this github repository does not have (all of the tags here are lightweight, which act differently), but either way it should work the same way as my machine.

I just pushed a commit that should fix this.

@AntonioND AntonioND merged commit 24bedf0 into blocksds:master Oct 12, 2024
@AntonioND
Copy link
Member

Ok, I see. Thanks for the investigation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants